<template>
  <div  class="label-top">
    <el-row :gutter="15">
      <el-col :span="16">
        <el-form ref="form" :model="form" :disabled="true"  label-position="top" label-width="120px">
          <el-row :gutter="15">
            <el-col :span="12">
              <el-form-item label="单位名称" prop="cName">
                <el-input v-model="form.cName" placeholder="请输入单位名称"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="行业" prop="cIndustry">
                <el-select v-model="form.cIndustry" placeholder="请选择行业">
                  <el-option
                    v-for="dict in dict.type.product_industry"
                    :key="dict.value"
                    :label="dict.label"
                    :value="dict.value"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="应用场景" prop="cScene">
                <el-input v-model="form.cScene" placeholder="请输入应用场景"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="人员规模" prop="cScale">
                <el-select v-model="form.cScale" placeholder="请选择人员规模">
                  <el-option
                    v-for="dict in dict.type.personnel_size"
                    :key="dict.value"
                    :label="dict.label"
                    :value="dict.value"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="适配OS" prop="cOs">
                <el-select v-model="form.cOs" placeholder="请选择适配OS">
                  <el-option
                    v-for="dict in dict.type.audition_os"
                    :key="dict.value"
                    :label="dict.label"
                    :value="dict.value"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="适配平台" prop="cPlatform">
                <el-input v-model="form.cPlatform" placeholder="请输入适配平台"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">

              <el-form-item label="建设内容">
                <el-input type="textare" v-model="form.cContent"  />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="使用评价" prop="cEvaluate">
                <el-input v-model="form.cEvaluate" placeholder="请输入使用评价"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="应用系统名称" prop="cAppName">
                <el-input v-model="form.cAppName" placeholder="请输入应用系统名称"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="竣工日期" prop="cCompletionDate">
                <el-input v-model="form.cCompletionDate" placeholder="请输入竣工日期"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="建设周期" prop="cConstructionCycle">
                <el-input v-model="form.cConstructionCycle" placeholder="请输入建设周期"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="硬件产品清单" prop="cHardwareInventory">
                <el-input type="textarea" v-model="form.cHardwareInventory" placeholder="请输入硬件产品清单"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="软件产品清单" prop="cSoftwareInventory">
                <el-input type="textarea" v-model="form.cSoftwareInventory" placeholder="请输入软件产品清单"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">



              <el-form-item label="附件" prop="cAttachment">
                <file-upload v-model="form.cAttachment" placeholder="请输入附件"/>
              </el-form-item>


            </el-col>
          </el-row>
        </el-form>
      </el-col>
      <el-col :span="8">
        <el-descriptions title="审核记录"></el-descriptions>
        <div class="block">
          <el-timeline>
            <el-timeline-item
              v-for="item in auditingList"
              :key="item.id"
              :timestamp="item.createTime"
              :type="item.aState === '1'?'danger':'success'"

              placement="top">
              <el-card>
                <div slot="header" class="clearfix">
                  {{ item.createBy }}
                </div>
                <p> {{item.aInfo}}</p>
              </el-card>
            </el-timeline-item>
          </el-timeline>
        </div>
      </el-col>
    </el-row>

  </div>
</template>

<script>
import EditMixin from "@/minixs/edit"
import request from "@/utils/request";

export default {
  name: "detail",
  mixins: [EditMixin],
  dicts: ['product_industry', 'audition_os','personnel_size'],
  data() {
    return {
      // 审核列表
      auditingList:[],
      // 表单数据
      form: {
        id: null,
        climecode: null,
        climename: null,
        pcode: null,
        delFlag: null,
        createBy: null,
        updateBy: null,
        createTime: null,
        updateTime: null,
        remark: null
      },
    }
  },
  mounted() {
    request({
      url: '/info/caseInfo/' + this.id,
      method: 'get'
    }).then(res => {
      this.form = res.data;
    })

    request({
      url: '/info/auditing/list',
      method: 'get',
      params: {
        pageNum: 1,
        pageSize: 100,
        aPId:this.id,
        pName:"casc_info"
      }
    }).then(response => {
      this.auditingList = response.rows;
    });
  },
};
</script>
